<?php

namespace backend\models;

use yii\web\UploadedFile;

class Upload extends \yii\db\ActiveRecord {
    /**
     * @var UploadedFile|Null file attribute
     */
    public $file;
    /**
     * @return array the validation rules.
     */
    public function rules()
    {
        return [
                [ [ "file" ], "file", 'maxFiles' => 1, 'extensions' => 'jpg,png,gif' ],
        ];
    }
    public function attributeLabels()
    {
        return [
            'file' => '文件上传',
        ];
    }

}
